package portal.entities;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Transient;

import portal.vo.AbstractVO;
import portal.vo.ConfigVO;


@Entity
@Table(name="Config")
public class Config extends AbstractEntity<ConfigVO>{

	
	private String configurationKey;
	private String configurationValue;	
	private String configurationDesc;
	

	public Config(){}
	

	public String getConfigurationKey() {
		return configurationKey;
	}


	public void setConfigurationKey(String configurationKey) {
		this.configurationKey = configurationKey;
	}


	public String getConfigurationValue() {
		return configurationValue;
	}


	public void setConfigurationValue(String configurationValue) {
		this.configurationValue = configurationValue;
	}
	
	
	@Transient
	public ConfigVO getVO() {
		ConfigVO vo = new ConfigVO();
		vo.setId(this.id);
		vo.setConfigurationKey(this.configurationKey);
		vo.setConfigurationValue(this.configurationValue);
		vo.setConfigurationDesc(this.configurationDesc);
		
		return vo;
	}

	@Transient
	public void setVO(ConfigVO vo) {
		
		this.setId(vo.getId());
		this.setConfigurationKey(vo.getConfigurationKey());
		this.setConfigurationValue(vo.getConfigurationValue());
		this.setConfigurationDesc(vo.getConfigurationDesc());
		
	}


	public String getConfigurationDesc() {
		return configurationDesc;
	}


	public void setConfigurationDesc(String configurationDesc) {
		this.configurationDesc = configurationDesc;
	}




	
	
		
	
}
